<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Get system name</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.posix-ttyname.html">posix_ttyname</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="book.exec.html">Program execution</a></div>
 <div class="up"><a href="ref.posix.html">POSIX 函数</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="function.posix-uname" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">posix_uname</h1>
  <p class="verinfo">(PHP 4, PHP 5)</p><p class="refpurpose"><span class="refname">posix_uname</span> &mdash; <span class="dc-title">Get system name</span></p>

 </div>
 
 <div class="refsect1 description" id="refsect1-function.posix-uname-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="type">array</span> <span class="methodname"><strong>posix_uname</strong></span>
    ( <span class="methodparam">void</span>
   )</div>

  <p class="para rdfs-comment">
   Gets information about the system.
  </p>
  <p class="para">
   Posix requires that assumptions must not be made about the
   format of the values, e.g. the assumption that a release may contain
   three digits or anything else returned by this function.
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.posix-uname-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   Returns a hash of strings with information about the
   system. The indices of the hash are
   <ul class="itemizedlist">
    <li class="listitem"><span class="simpara">
      sysname - operating system name (e.g. Linux)
     </span></li>
    <li class="listitem"><span class="simpara">
      nodename - system name (e.g. valiant)
     </span></li>
    <li class="listitem"><span class="simpara">
      release - operating system release (e.g. 2.2.10)
     </span></li>
    <li class="listitem"><span class="simpara">
      version - operating system version (e.g. #4 Tue Jul 20
      17:01:36 MEST 1999)
     </span></li>
    <li class="listitem"><span class="simpara">
      machine - system architecture (e.g. i586)
     </span></li>
    <li class="listitem"><span class="simpara">
      domainname - DNS domainname (e.g. example.com)
     </span></li>
   </ul>
  </p>
  <p class="para">
   domainname is a GNU extension and not part of POSIX.1, so this
   field is only available on GNU systems or when using the GNU
   libc.
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-function.posix-uname-examples">
  <h3 class="title">范例</h3>
  <p class="para">
   <div class="example" id="example-3580">
    <p><strong>Example #1 Example use of <span class="function"><strong>posix_uname()</strong></span></strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br />$uname</span><span style="color: #007700">=</span><span style="color: #0000BB">posix_uname</span><span style="color: #007700">();<br /></span><span style="color: #0000BB">print_r</span><span style="color: #007700">(</span><span style="color: #0000BB">$uname</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</code></div>
    </div>

    <div class="example-contents"><p>以上例程的输出类似于：</p></div>
    <div class="example-contents screen">
<div class="cdata"><pre>
Array
(
    [sysname] =&gt; Linux
    [nodename] =&gt; funbox
    [release] =&gt; 2.6.20-15-server
    [version] =&gt; #2 SMP Sun Apr 15 07:41:34 UTC 2007
    [machine] =&gt; i686
)
</pre></div>
    </div>
   </div>
  </p>
 </div>


</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.posix-ttyname.html">posix_ttyname</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="book.exec.html">Program execution</a></div>
 <div class="up"><a href="ref.posix.html">POSIX 函数</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
